﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;


namespace web2012_11_21
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {

            }
        }
        public int x=0;
        protected void Button1_Click(object sender, EventArgs e)
        {
            


            //Response.Redirect("ui.aspx?x=" + HttpUtility.UrlEncode("我重庆", Encoding.UTF8) + "&y=" + HttpUtility.UrlEncode("你邻水", Encoding.UTF8));
            //Response.Redirect("ui.aspx?x=我重庆&y=你邻水");
            //Response.Write("<script language=javascript>window.location='ui.aspx?x=" + HttpUtility.UrlEncode("我")+"&y="+HttpUtility.UrlEncode("你") + "'</script>");

            

            ////跳转页面
            //asd();
            //string x = Session["asad"].ToString();
            //Response.Write("<script language=javascript>alert('"+x+"');</script>");

            //DateTime t = DateTime.Now;//Convert.ToDateTime("2012/12/31 17:25:41");//    //当前时间
            //DateTime t1 = t.AddHours(-1); //前一小时
            //DateTime t2 = t.AddHours(24); //前六小时
            //if (t1 > t)
            //{
            //    Response.Write(t1.ToString());
            //}
            //else
            //{
            //    Response.Write(t.ToString());
            //}
            
            
                x++;
                //Session["x"] = "123";
            //Server.Transfer("ui.aspx?x=QWERTYUIOPASDFGHJKLZXCVBNM,");
            //Server.Execute("ui.aspx?X=123");

            //Response.Redirect("ui.aspx");
            //Button1.Enabled = false;
            //Response.Write("<script>function LeftConfirm() {if (checkSubmitFlg == false) {alert('123');  }else {window.event.returnValue = '确认你要刷新页面吗？'; }}</script>");
            //Response.Write("<script language='javascript' type='text/javascript'>checkSubmitFlg=false;</script>");
        }

        private static void asd()
        {
            HttpContext.Current.Response.Write("<script language=javascript>window.open('UI.aspx','name1','toolbar=yes'););</script>");//("UI.aspx");
            //Response.Write("<script language=javascript>window.open('UI.aspx');</script>");
            HttpContext.Current.Session["asad"] = "qwe";
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void DropDownList1_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
